﻿<ucd:HeaderedDialogWindow x:Class="BookReader.OptionWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ucd="clr-namespace:BookReader.Dialogs"
    Title="Options" Height="314" Width="514"
    DialogDescription="Configure book reader options"
    DialogImage="/BookReader;component/Resources/Images/tools.png"
    Style="{DynamicResource HeaderedDialogWindow}"
    Loaded="Window_Loaded">
        <Grid Margin="7">
            <Grid.RowDefinitions>
                <RowDefinition Height="32" />
                <RowDefinition Height="32" />
                <RowDefinition Height="32" />
                <RowDefinition Height="32" />
                <RowDefinition Height="32" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="140*" />
                <ColumnDefinition Width="296*" />
            </Grid.ColumnDefinitions>
                <Label Grid.Column="0" HorizontalAlignment="Left">Catalog Path</Label>
                <TextBox Height="25" Grid.Column="1" Margin="0,0,21,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Name="textBoxPath" ToolTip="The path to your books. Include sub-directories"/>
                <Button Grid.Column="1" Height="25" Width="20" HorizontalAlignment="Right" VerticalAlignment="Top" Name="btnBrowse" Click="btnBrowse_Click">...</Button>
                    
                <Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch">Image Cache</Label>
                <TextBox Grid.Row="1" Grid.Column="1" Height="25"  VerticalAlignment="Top" HorizontalAlignment="Stretch" Name="textBoxCache" ToolTip="Number of images to keep in cache. This allways include 3 pages after the current one for quick reading." />
                
                <Label Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" >Image Cache Duration</Label>
                <Slider Grid.Column="1" Grid.Row="2" Name="sliderDurationCache" Height="25"  VerticalAlignment="Top" Value="5" SmallChange="1" LargeChange="1" Maximum="10" TickPlacement="TopLeft" TickFrequency="1" IsSnapToTickEnabled="True" AutoToolTipPlacement="None" ToolTip="From 0 to 10, How long the images stays in memory from his last acces" />
                <Label Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch">Use Auto Fit</Label>
                <StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal">
                    <RadioButton GroupName="AutoFit" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0" Name="rbNone">None</RadioButton>
                    <RadioButton GroupName="AutoFit" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0" Name="rbWidth">Width</RadioButton>
                    <RadioButton GroupName="AutoFit" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0" Name="rbHeight">Height</RadioButton>
                </StackPanel>
                <Label Grid.Column="0" Grid.Row="4" HorizontalAlignment="Stretch">Debuging</Label>
                <CheckBox Grid.Column="1" Grid.Row="4" Margin="2,2,2,2" Name="chkUseDebug" ToolTip="Display a dialog with 'debug' information">Activate debuging display.</CheckBox>

                <Button Grid.Row="5" Name="BtnReset" Click="Reset_Click" ToolTip="Reset to default settings" Margin="33.142,19,33.142,0">Reset</Button>
                <Button Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Name="BtnCancel" Width="75" Click="Cancel_Click" IsCancel="True" Margin="50,0,0,0" ToolTip="Cancel">Cancel</Button>
                <Button Grid.Column="1" Grid.Row="5 " HorizontalAlignment="Right" Name="BtnOk" Width="75" Click="Ok_Click" IsDefault="True" Margin="0,0,50,0" ToolTip="Ok">Ok</Button>
                
    </Grid>
</ucd:HeaderedDialogWindow>
